<!DOCTYPE html>
<html lang="en">

<head>
    <title>品学联萌</title>
    <#include "/pxlm/app/product/components/meta.html" />
    <#include "/pxlm/app/product/components/stylesheets.html" />
    <link rel="stylesheet" href="/pxlm/app/product/stylesheets/user.css?v=1">
</head>

<body>
    <div id="app">
        <header data-am-widget="header" class="am-header am-header-default am-header-fixed" style="background:url('/pxlm/img/pxlmappbanner.png') no-repeat center">
            <h1 class="am-header-title">用户中心</h1>
        </header>
        <div class="top">
            <div class="avatar">
                <div class="avatar-box fillimg">
                    <img :src="info.headimgurl" />
                </div>
            </div>
            <div class="user">
                <div class="name">{{ info.nickName }}</div>
                <div class="bind-mobile">点击绑定手机号码</div>
            </div>
        </div>
        <div class="block">
            <div class="user-item">
                <i class="icon am-icon am-icon-user"></i>
                <div class="name">我的订单</div>
                <i class="right am-icon am-icon-chevron-right"></i>
            </div>
        </div>
        <div class="block">
            <div class="user-item">
                <i class="icon am-icon am-icon-user"></i>
                <div class="name">技术支持</div>
                <i class="right am-icon am-icon-chevron-right"></i>
            </div>
        </div>
        <#include "/pxlm/app/product/components/tabbar.html" />
    </div>
    <#include "/pxlm/app/product/components/scripts.html" />
    <script type="text/javascript">
    var app = new Vue({
        el: '#app',
        data() {
            return {
                info: ''
            }
        },
        mounted: function() {
            this.init();
        },
        methods: {
            init() {
                var url = '${host!}/pxlm/app/product/api/profile';
                var params = {};
                var success = res => {
                    console.log(res);
                    this.info = res.info;
                }
                var fail = res => {
                    console.log(res);
                }
                var complete = () => {}
                request(url, params, success, fail, complete);
            }
        }
    })
    </script>
</body>

</html>